package io.renren.entity;

import java.util.ArrayList;
import java.util.List;

/**
 * 表数据
 * 
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2016年12月20日 上午12:02:55
 */
public class TableEntity {
	//表的名称
	private String tableName;
	//表的备注
	private String comments;
	//表的主键
	private ColumnEntity pk;
	//表的外键
	private List<ColumnEntity> fks;
	//表的列名(不包含主键和外键)
	private List<ColumnEntity> columns;
	//用于排序的列名
	private List<ColumnEntity> columnsSort;
	
	//类名(第一个字母大写)
	private String className;
	//类实例名(第一个字母小写)
	private String classname;
	//数据库Model类名
	private String modelName;
	
	public TableEntity() {
		this.fks = new ArrayList<ColumnEntity>();
		this.columns = new ArrayList<ColumnEntity>();
		this.columnsSort = new ArrayList<ColumnEntity>();
	}
	
	public String getTableName() {
		return tableName;
	}
	public void setTableName(String tableName) {
		this.tableName = tableName;
	}
	public String getComments() {
		return comments;
	}
	public void setComments(String comments) {
		this.comments = comments;
	}
	public ColumnEntity getPk() {
		return pk;
	}
	public void setPk(ColumnEntity pk) {
		this.pk = pk;
	}
	public List<ColumnEntity> getColumns() {
		return columns;
	}
	public void setColumns(List<ColumnEntity> columns) {
		this.columns = columns;
	}
	public String getClassName() {
		return className;
	}
	public void setClassName(String className) {
		this.className = className;
	}
	public String getClassname() {
		return classname;
	}
	public void setClassname(String classname) {
		this.classname = classname;
	}
	public List<ColumnEntity> getColumsSort() {
		return columnsSort;
	}
	public void setColumsSort(List<ColumnEntity> columsList) {
		this.columnsSort = columsList;
	}
	public String getModelName() {
		return modelName;
	}
	public void setModelName(String modelName) {
		this.modelName = modelName;
	}
	public List<ColumnEntity> getFks() {
		return fks;
	}
	public void setFks(List<ColumnEntity> fks) {
		this.fks = fks;
	}
}
